package com.ftg.learn.day11;

import java.io.*;

/**
 * 写流
 *
 * @author kangjx
 * @version 1.0
 * @date 2023/8/18 上午10:38
 */
public class CharStreamWrite {

    public static void main(String[] args) {
        String path = "/home/kangjx/Desktop/aoe.txt";
        File file = new File(path);

        if (!file.exists()) {
            try {
                file.createNewFile();
                try (
                        Writer write = new FileWriter(file);
                ) {
                    write.write("我感觉今天这2500W稳了");
                } catch (Exception e) {
                    e.printStackTrace();
                }
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
//        有五个苍蝇，它们在一个数组里面，分别  小花......把它们永远存储起来 flys.txt
    }

}
